Skip to content

feat(a2a): wire artifact delivery interceptor in fast_api A2A setup#5380

Open
Venseven wants to merge 1 commit intogoogle:mainfrom
Venseven:fix/enable-artifact-interceptor-by-default
Open

feat(a2a): wire artifact delivery interceptor in fast_api A2A setup#5380
Venseven wants to merge 1 commit intogoogle:mainfrom
Venseven:fix/enable-artifact-interceptor-by-default

Conversation

@Venseven
Copy link
Copy Markdown

Summary

include_artifacts_in_a2a_event_interceptor was added in commit e63d991 to allow artifact delivery on the A2A path. However it was never wired — fast_api.py constructs A2aAgentExecutor with no config, so execute_interceptors defaults to None and artifact_delta is silently dropped.

This PR passes include_artifacts_in_a2a_event_interceptor as the default interceptor when setting up A2A agents in fast_api.py.

Changes

  • fast_api.py: pass A2aAgentExecutorConfig(execute_interceptors=[include_artifacts_in_a2a_event_interceptor]) when constructing A2aAgentExecutor

Behaviour

  • Before: agents that call artifact_service.save_artifact() emit no TaskArtifactUpdateEvent on the A2A path — artifact_delta is dropped
  • After: saved artifacts are delivered as TaskArtifactUpdateEvent on both message/send and message/stream paths

Non-breaking

The interceptor is a no-op when artifact_delta is empty or artifact_service is None. Users who want to opt out can pass execute_interceptors=[] explicitly.

Testing

Verified end-to-end with a LangGraph-based agent using google-adk==1.31.0: artifacts saved during an agent run now appear as TaskArtifactUpdateEvent in A2A message/send responses after this change.

Fixes #5379
Relates to #3630

Pass include_artifacts_in_a2a_event_interceptor as default interceptor
when constructing A2aAgentExecutor in fast_api.py. Previously the
interceptor existed (added in e63d991) but was never wired — A2aAgentExecutor
was created with no config so execute_interceptors defaulted to None and
artifact_delta was silently dropped on the A2A path.

Non-breaking: interceptor is no-op when artifact_delta is empty or
artifact_service is None.

Fixes google#5379
Relates to google#3630
@google-cla
Copy link
Copy Markdown

google-cla bot commented Apr 17, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@adk-bot adk-bot added the core [Component] This issue is related to the core interface and implementation label Apr 17, 2026
@adk-bot
Copy link
Copy Markdown
Collaborator

adk-bot commented Apr 17, 2026

Response from ADK Triaging Agent

Hello @Venseven, thank you for your contribution!

Before we can merge this PR, you need to sign the Contributor License Agreement (CLA). You can do so by following the instructions in the comment from google-cla.

Also, could you please provide the console output or logs from your end-to-end testing? This will help the reviewers to verify the fix more efficiently.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core [Component] This issue is related to the core interface and implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A2A artifact delivery interceptor exists but is never enabled by default

2 participants